<?php
/**
*	颜色插件
*/
namespace Rainrock\Framework\kernel\base;



final class Color{
	
	/**
	*	获取rgb的颜色对应值
	*/
	public static function colorTorgb($color)
	{
		if(!empty($color)&&(strlen($color)==7)){
			$r=hexdec(substr($color,1,2));
			$g=hexdec(substr($color,3,2));
			$b=hexdec(substr($color,5));
		}else{
			$r=$g=$b='00';
		}
		return array($r, $g, $b);
	}
}